home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 85 / 4thf83.doc next >
Text File  |  1986-07-13  |  6KB  |  146 lines

  1.  
  2.                     Forth-83 for the Atari ST
  3.  
  4. This  public-domain Forth model closely follows the 16 bit Forth-
  5. 83 implementation written by Henry Laxen and Michael  Perry.   Of 
  6. course, some changes were neccessary for F83 to work on the Atari 
  7. ST computers.  This version was modified by George Morison.
  8.  
  9. List of files:
  10.  
  11.      F83.TOS        This is Forth, compiled and ready to run.
  12.      READ.ME        The file you are reading.  It explains all
  13.                     potential bugs and Atari specific features.
  14.                     I recommend reading this file completely
  15.                     before downloading the following files.
  16.  
  17.      KERNEL.TOS     This is the bare-bones version of Forth used
  18.                     for re-extending the system.
  19.      EXTEND.BLK     Contains the file interface.
  20.      KERNEL.BLK     The kernel blocks.  Used by the meta-compiler
  21.                     for generating a new kernel.
  22.      META.BLK       The meta-compiler program.
  23.      UTIL.BLK       Contains code for the editor, decompiler, and
  24.                     printer words.  Rename to UTILITY.BLK
  25.      CPU68.BLK      The forth assembler and low-level routines
  26.                     used by the debugger and multi-tasker.
  27.                     Rename to CPU68000.BLK
  28.      TRAPS.BLK      Just a few of the Atari xbios calls.
  29.      
  30.  
  31. ---- For Beginners
  32. If  you are new to Forth,  the first thing you should do is get a 
  33. copy of "Starting Forth",  by Leo Brodie.   This will aquaint you 
  34. with the Forth language and the usual way of doing things such as 
  35. editing.
  36.  
  37. In fact,  the editor in F83 is identical to the one described  by 
  38. Brodie,  so you should have little difficulty learning it.  Also, 
  39. F83  has  the  word "NEW" which allows some  full-screen  editing 
  40. functions.
  41.  
  42. F83  is written in Forth and has the ability to recompile  itself 
  43. into  a new version whenever desired.   You will need the  source 
  44. screen  files  to accomplish this (listed  above).   These  files 
  45. offer excellent instruction on the Forth language and make up the 
  46. reference  manual  for  the Laxen and  Perry  Forth  model.   For 
  47. further reading on F83,  consult "Inside F83", by C. H. Ting PhD, 
  48. available from the Forth Interest Group (FIG), P.O. Box 8231, San 
  49. Jose,  CA  95155.   FIG is a good source for books on Forth  pro-
  50. gramming and FIG members receive "Forth Dimensions" bi-monthly.
  51.  
  52.  
  53. ---- Atari ST specifics
  54. HEADER  has  been changed to include a small loader  program  for 
  55. forth.   When  you run F83.TOS,  it relocates to $10000 * BANK (a 
  56. constant in kernel.blk 1 & 22) + $500.  Make sure BANK is set for 
  57. where you want forth to load.   The loader is not intelligent  so 
  58. you might have problems if it tries to write over itself.
  59.  
  60. BDOS  and  BIOS are gone.   They have been replaced with  TRAP#1, 
  61. TRAP#13,  and TRAP#14.   These are found in kernel.blk 44.   They 
  62. make no attempt to clean the stack after execution.  This must be 
  63. taken care of in the calling word.
  64.  
  65. In kernel.blk 49,  B/REC has been changed from 128 to 1024  which 
  66. means that REC/BLK is changed from 8 to 1.  Might as well let the 
  67. Atari read a whole block at once since it can.
  68.  
  69. A  44  byte DMA buffer was added along with CLR-DMA to erase  it.  
  70. CLR-DMA takes a 16 bit address for a parameter.  SET-DMA has been 
  71. changed  to  require a 32 bit address in case someone  needs  it.  
  72. These words are found in kernel.blk 51.
  73.  
  74. HANDLE#  is a new word that offsets to the handle from an fcb  on 
  75. the stack.  It works just like MAXREC#.  kernel.blk 51
  76.  
  77. DOS-FCB and DEFAULT have been taken out.   kernel.blk 57
  78.  
  79. SET-ID  is a new word in utility.blk 26 that sets the editor's ID 
  80. to the control panel date.   You must edit this block and replace 
  81. " gem" with your initials (should be line 14).
  82.  
  83.  
  84. ---- Generating and Extending a new kernel
  85. GENERATING  a  new  kernel  is easy.   Make sure  that  you  have 
  86. KERNEL.BLK and META.BLK on the same disk and from inside  F83.TOS 
  87. type:
  88.      OPEN META.BLK  <cr>
  89.      1 LOAD  <cr>
  90.  
  91. The  meta-compiler  will  load itself and then  load  the  kernel 
  92. blocks with whatever changes you have made.   When it's finished, 
  93. it writes the new KERNEL.TOS to the disk.
  94.  
  95. EXTENDING  a  new kernel is also easy.   Make sure that you  have 
  96. EXTEND.BLK,  TRAPS.BLK, CPU68000.BLK, and UTILITY.BLK on the same 
  97. disk and from inside KERNEL.TOS type:
  98.      EXTEND  <cr>
  99.      1 LOAD  <cr>
  100.  
  101. After  extending,  a  new  version of  Forth  with  the  standard 
  102. features and utilities will be saved to your disk as F83.TOS.
  103.  
  104.  
  105. ---- Potential Bugs
  106. This  forth does have bugs in it.   I will continue to try fixing 
  107. the ones I know about or any new ones that are found.  One reason 
  108. for  uploading  these files was to allow others to  help  in  the 
  109. effort.  Here is the list:
  110.  
  111.  
  112.      MULTI          No clue for this.
  113.      DEBUG          I have played with this code and tried to
  114.                     make all the addresses long but it still
  115.                     has problems.
  116.      CREATE-FILE    This works properly for creating files of
  117.                     1 or 2 blocks.  It drops 1 block for any
  118.                     file over that.
  119.      MORE           Most likely the reason for the problems in
  120.                     CREATE-FILE.  Also, this could erase blocks
  121.                     starting with the block that was last
  122.                     accessed from the currently open file.
  123.                     Rather than use MORE to add blocks to a file,
  124.                     it would be safer to create a new file and
  125.                     convey the blocks to it.  At least until this
  126.                     bug gets fixed.
  127.  
  128.  
  129. ---- Invitation
  130. There is something of a tradition among Forth users to offer help 
  131. in  fine-tuning public domain implementations.   If you have  any 
  132. ideas,  suggestions,  and  especially  "fixes",  I hope you  will 
  133. continue this tradition by uploading them to this SIG.   Also,  a 
  134. 32-bit  version of F83 for the Atari ST would be  an  outstanding 
  135. contribution.  But in lieu of that, we would like to see graphics 
  136. and  sound vocabularies as well as anything else specific to  the 
  137. ST.   Finally, I have refrained from uploading the shadow screens 
  138. for  KERNEL.BLK because of the large size,  but will do so  as  a 
  139. separate file should anyone request.
  140.  
  141.  
  142.  
  143. George Morison
  144. 70745,1411  CompuServe
  145.  
  146. əəəəəəəəəəəəəəəəəəəəəəə